// -- these are definitions and initializations of C/CPP common variables
volatile int g_visportalindex = UNINITIALIZED_PORTAL_INDEX; // a client's portal index : current portalindex being worked on
volatile int g_visportals = 0; // the total portals in the map
volatile int g_visleafs = 0; // the total portal leafs in the map
volatile int g_vislocalportal = 0; // number of portals solved locally
volatile enum vis_states g_visstate = VIS_STARTUP; // current step of execution
volatile enum vis_modes g_vismode = VIS_MODE_NULL; // style of execution (client or server)
volatile int g_visleafthread = 0; // control flag (are we ready to leafthread)
unsigned int g_rate = DEFAULT_NETVIS_RATE;
volatile double g_starttime = 0; // Start time (from I_FloatTime())
volatile unsigned long g_idletime = 0; // Accumulated idle time in milliseconds (rolls over after 46.7 days, hopefully a vis client wont run that long)
volatile unsigned long g_serverindex = 0; // client only variable, server index for calculating percentage indicators on the client
char* g_bsp_image = NULL; // Client/Server variable : Server uses it for cache for connecting clients, clients download it to memory to not require filesystem usage
char* g_prt_image = NULL; // Client/Server variable : Server uses it for cache for connecting clients, clients download it to memory to not require filesystem usage
unsigned long g_bsp_compressed_size = 0; // Server variable
unsigned long g_prt_compressed_size = 0; // Server variable